package cuiyt.offer;

/**
 * @author cyt
 * @create 2020-05-20 11:38
 */
public class T18 {

    public static void main(String[] args) {
        int k = 20;
        int ans = 0;
        for (int i = 1; i <= 20; i++) {
            char[] chars = String.valueOf(i).toCharArray();
            for (char c : chars) {
                if(c == '1'){
                    ans ++;
                }
            }
        }
        System.out.println(ans);
    }
}
